package dao

import (

	"github.com/benji/software/model"
	"github.com/google/martian/log"
)

func CreateStudent(student *model.Student)error {
	if err := Db.Table("student").Save(&student).Error; err != nil {
		log.Errorf("fail to insert into student: %v\n", err)
		return err
	}
	return nil
}
